home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / misc / unix / alinux.lha / ALinux.DOC next >
Text File  |  1995-06-06  |  34KB  |  928 lines

  1.  
  2.                      Linux/68k for the Commodore Amiga
  3.  
  4.  
  5.                       The Complete Installation Guide
  6.  
  7.                     Written by Odd-Jarle Kristoffersen
  8.  
  9.  
  10. History
  11. -------
  12.  
  13. 6th June 1995   First Release
  14.  
  15.  
  16. Introduction
  17. ------------
  18.  
  19. Welcome to the world of UN*X operating system. A powerfull OS that is
  20. widely used around the world for network purposes. Linux is a very
  21. space friendly UN*X OS that is available for a lot of different machine
  22. platform such as Atari, IBM PC's and Macintosh.
  23.  
  24. The first releases of Linux was made for the IBM PC clones and as it
  25. came available to other machines the documentation didn't follow up for
  26. these as good as the PC documentation. This is the reason I decided to
  27. make a complete (well as close as possible) documentation to describe
  28. the basic setup and use of Linux for the Amiga.
  29.  
  30. I am by no means a UN*X expert but I wanted to make it easier for the
  31. people new to Linux to install this system on their machines. Reading
  32. on is at your own risk. Please refer to the chapter about The Author.
  33.  
  34.  
  35. Index
  36. -----
  37.         History
  38.         Introduction
  39.         System Requirements
  40.         Getting the required Linux files
  41.                 Where to get the Linux files
  42.         Testing Linux
  43.         Preparing files for harddrive installation
  44.         Preparing suitable harddrive partitions
  45.                 AmigaDOS partition
  46.                 Partitioning
  47.         Preparing fstab
  48.         Booting Linux for installating
  49.         Booting from installed harddrive
  50.         Failed to boot in Multi-User mode
  51.         Cleaning up the usr-partition
  52.         System overview
  53.                 Example of Bourne Again Shell (bash) configuration files
  54.                 The editor "vi"
  55.                 The password file
  56.                 Other files in /etc
  57.         Sources
  58.         Credits
  59.         Special thanks
  60.         The Author
  61.         Future plans
  62.  
  63.  
  64. System Requirements
  65. -------------------
  66.  
  67. For Linux to work you will need a harddrive with at least a 22 MB
  68. partition. Note that you CANNOT use a AmigaDOS partition as UN*X uses
  69. it's own HFS (hierarcic filesystem). It's recommended that you have one
  70. partition for / (root) and another for /usr (additional files).
  71.  
  72. The root-partition must be approx 3 MB and is the boot-partition. However
  73. I recommend that you leave some more space to edit and add files, and for
  74. logfiles. The /usr partition should be at least 19 MB, but you will need
  75. more if you want to install other programs such as X11 windows and editors.
  76. This is not much compared to NetBSD 1.0 which will require around 200MB
  77. for the complete installation, and around 80MB minimum.
  78.  
  79. SCSI and IDE controllers are supported.
  80.  
  81. My setup was on a separate 49MB SCSI drive partitioned into one 10 MB
  82. partition for root (/) and one 39 MB partition for additional files (/usr).
  83. This leaves room for installing additional software.
  84.  
  85. Linux should work on all processors from the 68000 to 68040. I haven't been
  86. able to test this but will verify as I get to do so. My machine is an A3000
  87. 25MHz 68030 based Amiga. I would recommend you have at least an 68030 to
  88. get usefull speed from the Linux OS.
  89.  
  90. You will need at least 4MB of FAST memory and 1MB of CHIP memory in your
  91. Amiga. Again, it's strongly recommended that you have as much memory as
  92. possible to run Linux.
  93.  
  94. Linux runs on default on a 640x400 interlaced screen, so a VGA or Multisync
  95. monitor would be recommended. Use of other screenmodes is currently unknown
  96. to me but I will do a own documentation on this when I've done research on
  97. it. It should possible to recompile the kernel to use other screens and
  98. add-on graphicboards.
  99.  
  100. You will also need some free space on an AmigaDOS harddrive partition for
  101. the required Linux files to be unpacked onto. Temporary free space must be
  102. at least 25 MB. When Linux has been installed you will need under 1MB
  103. for the boot-files.
  104.  
  105.  
  106. Getting the required Linux files
  107. --------------------------------
  108.  
  109. You will need some files to install Linux from. Specific for Amiga:
  110.  
  111.         A bootstrap program             amiboot-1.9.gz
  112.         A RAMdisk image                 filesys.gz
  113.         A kernel                        vmlinux-0.9.3.gz        or newer
  114.         GZip for Amiga to unpack files
  115.  
  116. GZip can be found on AmiNet. I've used version 1.23 (24.Jan 93).
  117. To unpack the GZip'ed files (*.gz) use the syntax:
  118.  
  119.         gzip -d <filename>.gz
  120.  
  121. GZip will unpack to the same directory and delete the *.gz file when done
  122. to save space.
  123.  
  124. The bootstrap program loads the kernel file, and you have to make sure you
  125. get a Amigaspecific bootstrap program. Look under the "amiga-directory" of
  126. Linux on Linuxsites. You should always get the latest bootstrap program
  127. unless other is specified in the ANNOUNCE files. Version 1.9 works with
  128. version 0.93 of the kernel.
  129.  
  130. The kernel should also be Amiga specific, and I'm using version 0.93. Newer
  131. version has been released (0.96 and 0.97) but I've not been able to boot
  132. with these yet.
  133.  
  134. The RAMdisk image is a 1MB (1024k) Linux bootable RAMdisk image you will
  135. need to install Linux from. You will need to boot from this when installing
  136. Linux. It can usually be found under the "filesys-directory" on Linuxsites.
  137. This is not an Amiga specific file.
  138.  
  139. Additional files you will need are:
  140.  
  141.         A root-disk image               root.tar.gz     (~730 kB)
  142.         A usr-disk image                usr.tar.gz      (~5.7 MB)
  143.  
  144. These are Linuxspecific binaries compressed with full paths and all
  145. directories needed to make a root- and usr-partition on your harddrive.
  146.  
  147.  
  148. Where to get the Linux files
  149. ----------------------------
  150.  
  151. Several Linuxsites on Internet offer these files. They are public domain,
  152. and there are mirrors of the mainsite that distribute them for you.
  153.  
  154. The developersite for Linux is:
  155.  
  156.         tsx-11.mit.edu
  157.  
  158. And the directory where the 680x0 specific files can be found in is:
  159.  
  160.         /pub/linux/680x0
  161.  
  162. Here you will find several subdirectories with the required files.
  163. Archivenames mentioned above might vary. Please notes the ANNOUCE
  164. files found in this directory as they contain important new-release
  165. information as Linux is under constant development.
  166.  
  167. A comprehensive list of sites and where to find these files will be made
  168. available.
  169.  
  170.  
  171. Testing Linux
  172. -------------
  173.  
  174. If you just want to see how Linux performs from a mimimum RAMdisk boot you
  175. will not require the root.tar.gz and usr.tar.gz files. You will only need
  176. 2 MB of free AmigaDOS space and NO harddrive partition.
  177.  
  178.         Unpack the GZip'ed files
  179.  
  180.                 amiboot-1.9.gz          (or newer)
  181.                 filesys.gz              (1024k image file!)
  182.                 vmlinux-0.9.3.gz        (or newer)
  183.  
  184.         in a AmigaDOS directory.
  185.  
  186.         You should now have these files:
  187.  
  188.                 bootstrap               (amiga executable)
  189.                 RAMdisk-image           (linux RAMdisk root)
  190.                 vmlinux-0.9.3           (or newer versionnumber)
  191.  
  192.         To test Linux by booting from the RAMdisk image:
  193.  
  194.                 bootstrap -k vmlinux-0.9.3 -r RAMdisk-image
  195.  
  196. Linux will now take over the AmigaOS and a grey screen telling you that
  197. Linux is starting up should appear. After a few seconds when Linux has
  198. checked what hardware you are using and loaded the necessary files, a
  199. prompt should appear. Something like:
  200.  
  201.         bash#
  202.  
  203. And a flashing cursor. You can now try various UN*X commands like "ls"
  204. and "cd". You will not be able to perform any usefull UN*X activites
  205. but it will let you know that Linux DOES work on your Amiga. If running
  206. Linux from the RAMdisk works you can be sure it will work from a
  207. harddrive too. This can be usefull before getting all the Linux files
  208. needed for installation.
  209.  
  210. To shutdown Unix and reboot your Amiga enter:
  211.  
  212.         /sbin/shutdown -r now
  213.  
  214. After a few seconds when Linux has updated all files it will automatically
  215. shutdown and reboot your Amiga. As UN*X uses it's own HFS it is VERY
  216. important when running from a harddrive that you use the "shutdown" command
  217. and preferably "sync" before too to make sure all data is saved. It is
  218. very easy to wreck the whole Linux OS if you don't follow this procedure.
  219. All data will then be lost (from the Linux partitions) and can NOT be
  220. restored.
  221.  
  222.  
  223. Preparing files for harddrive installation
  224. ------------------------------------------
  225.  
  226. Assuming you downloaded all the required files you are now ready to
  227. start installing Linux on your machine.
  228.  
  229. Put all files into a directory and unzip the GZip'ed files:
  230.  
  231.         gzip -d <filename>.gz
  232.  
  233. You will need about 25MB of AmigaDOS space for the unziped archives.
  234. These should be:
  235.  
  236.         filename                description                     approx size
  237.         -------------------------------------------------------------------
  238.         bootstrap               amiga executable                ~12 kB
  239.         RAMdisk-image           Linux filesys image             1 MB
  240.         vmlinux-0.9.3           or newer version for amiga      ~650-700 kB
  241.         root.tar                Linux / (root) image            ~2.7 MB
  242.         usr.tar                 Linux /usr (additiona) image    ~18 MB
  243.  
  244.  
  245. Preparing suitable harddrive partitions
  246. ---------------------------------------
  247.  
  248. You are now ready to make the required Linux harddrive partitions. Note that
  249. these steps must be followed CAREFULLY as one mistake might RUIN all or
  250. some of your AmigaDOS partitions. If you are not 100% sure how to do the
  251. following steps please consult help from a more experienced Amiga user or
  252. your Amiga reseller. Please read these steps carefully before you start.
  253.  
  254. I would recommend that you put Linux on a own harddrive, but there is
  255. nothing wrong by having it on the same harddrive as your other AmigaDOS
  256. partitions. It's merely for safety when doing this for the first time.
  257.  
  258. I also recommend that you use Commodores HDToolBox supplied with AmigaDOS
  259. 2.0 or newer. Note that functions might vary slightly from those specified
  260. in this documentation. I am using HDToolBox v40.3, and steps will be
  261. described according to that versions functions. HDToolBox can be found
  262. in your "Tools" directory of your Workbench bootpartition or disk.
  263.  
  264. If you own a GVP, WarpEngine or other SCSI/IDE-controller you will need to
  265. start HDToolBox from CLI with the commandline:
  266.  
  267.         HDToolBox <device>
  268.  
  269. Where device is:
  270.  
  271.         scsi.device             Commodore internal SCSI (A3000)
  272.         gvpscsi.device          GVP internal/external SCSI/IDE controller
  273.  
  274. or other supplied device that came with your SCSI/IDE controller. Please
  275. consult your SCSI/IDE controller manual for more information.
  276.  
  277. You can also edit the info for HDToolBox to use it from Workbench.
  278. Click once on the HDToolBox icon and select Icon/Information (hotkey AMIGA-I)
  279. from the Workbench menu. Enter NEW item with the following line:
  280.  
  281.         device=<device>
  282.  
  283. as specificed above. HDToolBox uses Commodores scsi.device as default.
  284. The required device should be found in the DEVS: directory of your boot
  285. partition or disk.
  286.  
  287. You should be able to use any supplied HD-partitioning software that came
  288. with your controller. But as it might NOT tell you all the information you
  289. need I recommend you use HDToolBox to be sure. Consult your manual.
  290.  
  291. After starting up HDToolBox it will read all your connected SCSI/IDE drives
  292. and show a list of them in a window. Select the desired harddrive you want
  293. to install Linux on. Make a note of which drive you selected. First drive
  294. is listed first (DO NOT note down SCSI ID).
  295.  
  296. If HDToolBox finds newly added drives or unknown drive types it will
  297. ask if you want to save the drive type to a lookup-table on your
  298. Workbench disk. Refer to the AmigaDOS manuals on more information !
  299.  
  300.  
  301. AmigaDOS partition
  302. ------------------
  303.  
  304. Later in the installation you will need to access the AmigaDOS volume
  305. that contains the archived Linux files (root.tar and usr.tar). Therefor
  306. you will need to find out what drive and partition these are located on.
  307.  
  308. In HDToolBox:
  309.  
  310.         - Select the harddrive that contains your AmigaDOS volumes
  311.  
  312.         - Click on PARTITION DRIVE
  313.  
  314. Find out which partition NUMBER (leftmost in graph = 1st partition, last
  315. is shown as rightmost partition in graph) you have put the archived files
  316. on and note down it's number and which drive number it is on. Drivenumber
  317. is deteremined by counting from the top and down in HDToolBox's listing
  318. of drives.
  319.  
  320. For example you put the files in DH3:Linux/Archive. DH3: is refered
  321. to as the 2nd partition in the partitioning setup graph. Note that DH3
  322. not necessary has to refer to the 3rd partition because of the number.
  323. You have to check to find what drive has the name DH3 in HDToolBox's
  324. partitioning setup.
  325.  
  326.  
  327. Partitioning
  328. ------------
  329.  
  330. Before we can proceed we need to get some information about the desired
  331. harddrive you want to use. Note what drivetype and manufactor the desired
  332. drive has.
  333.  
  334.         - Click on CHANGE DRIVE TYPE
  335.  
  336.         - Select the correct drivetype from the list by clicking on it
  337.           and choose EDIT OLD.
  338.  
  339. A list of the harddrive data will be shown. You will need tonote down how
  340. many BLOCKS PER CYLINDER this drive has as you will need it later.
  341.  
  342. Perform this operation on all the drives you want to use for Linux. If
  343. you want both partitions on the same drive it will only be necessary to
  344. do it once. MAKE SURE YOU SELECTED THE CORRECT DRIVE. If no data is
  345. available on your drive select NEW instead of EDIT OLD and then
  346. READ DATA FROM DRIVE to obtain the correct values.
  347.  
  348. DO NOT TRUST LEAFLETS that came with your drive. USE HDTOOLBOX !
  349.  
  350. Exit by clicking CANCEL or OK. Refer to the AmigaDOS manuals.
  351.  
  352.         - Click on PARTITION DRIVE
  353.  
  354. Do NOT change ANY AMIGADOS partitions unless you are SURE you want to
  355. change them. Chaning the AmigaDos partitions will ERASE ALL DATA that
  356. was on that partition.
  357.  
  358. Please refer to your AmigaDOS manuals for more specific information on
  359. how to use HDToolBox if in doubt!
  360.  
  361.         - Click on ADVANCED OPTIONS to turn them ON
  362.  
  363. Select the desired partition from the graphic view above the buttons.
  364. If you want to make a new partition click on NEW PARTITION and select
  365. a empty space to use.
  366.  
  367. Adjust the size of the partition to the required amount using the arrow
  368. below the partition graph.
  369.  
  370.         - At least 3MB for the root partition
  371.         - At least 19MB for the usr partition
  372.  
  373.         - Click on the DEVICE NAME BOX marked "CHANGE_ME" and alter the
  374.           name of the partition. Avoid using existing names on other drives.
  375.           It is not important what this name is set to.
  376.  
  377.         - Select BOOTABLE to NO (box not checked)
  378.  
  379.         - Click on CHANGE FILE SYSTEM and select CUSTOM FILE SYSTEM
  380.  
  381.         - Select AUTOMOUNT to NO (box not checked)
  382.  
  383.         - Set FILE SYSTEM BLOCK SIZE to 512
  384.  
  385.         - Enter new IDENTIFIER :
  386.  
  387.                 root:   0x42534452
  388.                 usr:    0x42534453
  389.  
  390. These are not important when using version 0.93 of the kernel.
  391.  
  392.         - Select RESERVED BLOCK AT BEGINNING and END to 0
  393.  
  394.         - Select USE CUSTOM BOOT CODE to NO (not checked box)
  395.  
  396. NUMBER OF CUSTOM BOOT BLOCKS should be 0 too.
  397.  
  398. Exit by clicking on OK to return to the partitioning setup.
  399.  
  400. Make a note of TOTAL CYLINDERS for each partition. Also note WHICH
  401. partition on the drive it is. First partition is shown as the leftmost
  402. partition in the graph, and the last one is the most rightmost.
  403.  
  404. For example if you made a new partition that is shown as the 4th
  405. partition from left in the graph and it contains 419 total cylinders
  406. note down:
  407.  
  408.         root:   Drive 1, partition 4, 420 cylinders, 60 blocks per cyl.
  409.  
  410. or
  411.  
  412.         usr:    Drive 3, partition 1, 1600 cylinders, 49 blocks per cyl.
  413.  
  414. You will need these figures later!
  415.  
  416. Make another partition following the steps above until you have two
  417. partitions. One at least 3MB and the other at least 19 MB. Now exit the
  418. partitioning setup after making notes on which drive, what partition and
  419. how many cylinders each partition uses as described above.
  420.  
  421.         - Click on OK
  422.  
  423.         - Click SAVE CHANGES TO DRIVE
  424.  
  425.         - Select CONTINUE if you are 100% SURE you want to save changes.
  426.  
  427.         - Click on EXIT
  428.  
  429.  
  430. Preparing fstab
  431. ---------------
  432.  
  433. You are now ready to install Linux on your partitions. But first you need
  434. to extract one file from the "root.tar" archive and edit it's contents to
  435. suit your drive setup.
  436.  
  437.         tar xf root.tar etc/fstab       (amigados)
  438.  
  439. fstab (filesystem table) contains information on your connected harddrives
  440. by using the following syntax:
  441.  
  442.         /dev/sdXY       /partition      filesystem      options
  443.  
  444. where:
  445.  
  446.         "X" is a letter for which drive ID
  447.                 (a being first drive on controller,
  448.                 b the second drive etc.)
  449.  
  450.         "Y" is the number of the partition on that drive
  451.                 (1 being first partition, 4 the 4th partition etc)
  452.  
  453.         "partition" is the name of the partition in Linux
  454.                 (for example / or /usr)
  455.  
  456.         "filesystem" is what type of filesystem this partition has
  457.                 (for example minix, ext2, proc, affs etc).
  458.  
  459.         "options" can be bits to show if partition is read/writable etc.
  460.  
  461. Each entry must be separated with at least one space and be on the same line.
  462. A # in from of a line means the line is commented out.
  463.  
  464. Now you will need to use an editor to edit this file to fit your setup. This
  465. is where the information obtained during partitioning the drive is needed.
  466.  
  467. If your root-partition was created on drive 1, as partition 4 this would be
  468. entered as:
  469.  
  470.         /dev/sda4       /               minix   default
  471.  
  472. And if your usr-partition was created on drive 3, as partition 1 it would be
  473. entered as:
  474.  
  475.         /dev/sdc1       /usr            minux   default
  476.  
  477. In other words the first partition on the lowest numbered drive on your
  478. controller is /dev/sda1.
  479.  
  480. Edit the "fstab" file to your setup and comment out previous setups. Save it
  481. when you are done.
  482.  
  483.  
  484. Booting Linux for installating
  485. ------------------------------
  486.  
  487. Now you can start Linux using the RAMdisk-image to prepare your harddrive
  488. partitions and install the necessary files on them.
  489.  
  490.         bootstrap -k vmlinux-0.9.3 -r RAMdisk-image
  491.  
  492.                   ^^ ^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^
  493.                      name of          name of ramdisk
  494.                      kernel to use    image file
  495.  
  496.         -k option specifies kernel filename, default "vmlinux".
  497.         -r option specifies to use ramdisk-image as specified.
  498.  
  499. When Linux has booted and the prompt has appeared on your screen you are
  500. ready to install the minix filesystem on your harddrive partitions.
  501. Before you commence you will need to calculate the size of each partition
  502. in 1kB blocks. AmigaDOS specifies them as 512 bytes.
  503.  
  504.         size = blocks per cylinder * number of cylinders / 2
  505.  
  506. Calculate using the above formula for both the root and usr partitions.
  507. Note down these figures and keep them with the rest in case you will
  508. need to change anything later or reformat any partition.
  509.  
  510. Create a minix filesystem on both partitions using the following syntax:
  511.  
  512.         /sbin/mkfs /dev/sdXY <size>
  513.  
  514. X is the drive number and Y is the partition number on that drive. size is
  515. the calculated size above. For example to prepare root as in example above
  516. where root is on drive 1, partition 4 and has 420 cylinders with 60 blocks
  517. per cylinder:
  518.  
  519.         size = 60 * 420 / 2 = 12600
  520.  
  521.         /sbin/mkfs /dev/sda4 12600      (linux commandline)
  522.  
  523. You have to be 100% sure before you perform this operation. Formatting the
  524. wrong drive and partition could destroy an AmigaDOS partition !
  525.  
  526. For the usr partition in the example:
  527.  
  528.         size = 49 * 1600 / 2 = 39200
  529.  
  530.         /sbin/mkfs /dev/sdc1 39200      (linux commandline)
  531.  
  532. You have now formatted the two partitions you need for installing Linux onto.
  533. Because of Linux's HFS filesystem you have to mount drives as directories
  534. under the root-directory. This is because the usr-partition is refered
  535. to as /usr. The fstab file tells Linux how to and where mount additional
  536. drives to your Linux system. This design makes it possible to mount AmigaDOS
  537. partitions as own directories in Linux. We will need to do so now to access
  538. the archives containing the required Linux root files.
  539.  
  540. First we need to create a temporary directory where we will mount the correct
  541. AmigaDOS volume that contains the archived files.
  542.  
  543.         mkdir /mnt2                             (linux commandline)
  544.         mount -t affs /dev/sdXY /mnt2           (linux commandline)
  545.  
  546. where X is the drive number containing the AmigaDOS volume and Y is the
  547. number of the desired partition where the archived files reside.
  548.  
  549. Now we need to mount the root partition. We will put it in the /mnt directory:
  550.  
  551.         mount /dev/sdXY /mnt                    (linux commandline)
  552.  
  553. where X is the drive number where your Linux root harddrive partition is, and
  554. Y is the number of that drives partition you created root on. This is the same
  555. as above where you formatted the Linux drives.
  556.  
  557. Go to the Linux root directory and unpack the root-archive from your AmigaDOS
  558. partition:
  559.  
  560.         cd /mnt                                 (linux commandline)
  561.         tar xvf /mnt2/path-to/root.tar          (linux commandline)
  562.  
  563. For example if you put the "root.tar" archive in /Linux/Archive enter:
  564.  
  565.         tar xvf /mnt2/Linux/Archive/root.tar    (linux commandline)
  566.  
  567. Note that Linux is CASE SENSITIVE !
  568.  
  569. To make sure everything is saved onto the disk:
  570.  
  571.         sync                                    (linux commandline)
  572.  
  573. Now we need to mount the usr-partition and unpack the usr.tar to it:
  574.  
  575.         mount /dev/sdXY /mnt/usr                (linux commandline)
  576.  
  577. where X is the drive number where your Linux usr harddrive partition is, and
  578. Y is the number of that drives partition you created usr on. This is the same
  579. as above where you formatted the Linux drives.
  580.  
  581.         cd /mnt/usr                             (linux commandline)
  582.         tar xvf /mnt2/path-to/usr.tar           (linux commandline)
  583.         sync                                    (linux commandline)
  584.  
  585. Now we need to put the new "fstab" in the correct directory:
  586.  
  587.         cd /mnt/etc                             (linux commandline)
  588.         cp /mnt2/path-to/fstab .                (linux commandline)
  589.         sync                                    (linux commandline)
  590.  
  591. We are now ready to reboot and use the harddrive partition, but first we need
  592. to unmount the mounted drives:
  593.  
  594.         umount -a                               (linux commandline)
  595.         umount /mnt                             (linux commandline)
  596.         /sbin/shutdown -r now                   (linux commandline)
  597.  
  598. Now you're Amiga will reboot AmigaDOS again. You might have to press
  599. CTRL-AMIGA-AMIGA manually if "shutdown" doesn't reboot after a few
  600. seconds.
  601.  
  602.  
  603. Booting from installed harddrive
  604. --------------------------------
  605.  
  606. Assuming your Amiga reboots and you managed to install Linux correctly you
  607. can now try and boot Linux from the harddrive partition:
  608.  
  609.         bootstrap -k vmlinux-0.9.3 root=/dev/sdXY
  610.  
  611. where X is the drive number where your Linux root harddrive partition is, and
  612. Y is the number of that drives partition you created root on. This is the same
  613. as above where you formatted the Linux drives.
  614.  
  615. If everything goes well you should be prompted with a login-prompt if
  616. Linux managed to boot in multi-user mode. Don't be alarmed if you do not
  617. get this prompt and instead a bash-prompt as when you booted with the
  618. ramdisk-image earlier. This only means that something in the configuration
  619. isn't correct.
  620.  
  621. At the login-prompt you should be able to login as root without any password.
  622. If this is successfull accomplished you may skip the next chapter.
  623.  
  624.  
  625. Failed to boot in Multi-User mode
  626. ---------------------------------
  627.  
  628. If the login prompt doesn't show it means something in your current
  629. configuration is wrong. Most likely it is your "fstab" file. If you
  630. get the error "fchk.mkfs /dev/sdXY failed, wrong filesystem" or
  631. similar during Linux boot you need to edit the fstab file, or copy
  632. the new you made earlier from AmigaDOS. To copy the new file in:
  633.  
  634.         mount -t affs /dev/sdXY /mnt2
  635.         cd /mnt2/path-to-fstab
  636.         cp fstab /etc
  637.  
  638. Remember to use the correct drivenumber (X) and partition number (Y)
  639. for the correct AmigaDOS volume.
  640.  
  641. If you wish to edit the "fstab" file you can do this in several ways.
  642. Currently the editor "ed" is only available after you booted. The
  643. documentation for "ed" is found on Internet by ftp to:
  644.  
  645.         tsx-11.mit.edu   /pub/linux/packages/utils/util-linux.1.1.src.tar.gz
  646.  
  647. To use "ed":
  648.  
  649.         cd /etc
  650.         ed fstab
  651.  
  652. If you don't feel confident to use "ed" you can use "cat". It can be usefull
  653. to first view the fstab file before editing it, to have a reference to
  654. the syntax of it:
  655.  
  656.         cd /etc
  657.         more fstab
  658.         cat > fstab
  659.  
  660. "cat" copies from the console to the file fstab. You will probably not be
  661. able to correct any typing errors if you make any. End with CTRL-D. Refer
  662. to earlier information on editing fstab to find out what to write in this
  663. file.
  664.  
  665.  
  666. Cleaning up the usr-partition
  667. -----------------------------
  668.  
  669. The usr.tar archive supplied with Linux requires that you will have to
  670. move some files to their correct paths. In general this is done by moving
  671. an entire directory-tree one step up towards the root-directory. After
  672. your installation the contents of / would be:
  673.  
  674.         /usr/usr
  675.         /usr/usr/bin
  676.         /usr/usr/lib
  677.         ...
  678.  
  679. This is wrong, as the directory-tree should be:
  680.  
  681.         /usr/bin
  682.         /usr/lib
  683.         ...
  684.  
  685. To correct this you will have to move all the directories one directory up,
  686. EXCEPT for usr. Delete usr and mv the other files one directory up.
  687. MAKE SURE YOU ARE LOCATED in /usr/usr by using the "pwd" command. It prompts
  688. what directory you are in.
  689.  
  690.         cd /usr/usr
  691.         command rm -rf usr
  692.         mv * ..
  693.  
  694. Now "mv" won't move complete directories so these have to be moved one by
  695. one. There aren't that many. Use "ls -la" to list all files in current
  696. directory (works similiar to dir):
  697.  
  698.         ls -la
  699.         mv bin ..
  700.         mv lib ..
  701.  
  702. Continue to move files using "mv" until all the listed directories have
  703. been moved. Check by using "ls -la":
  704.  
  705.         ls -la                  (should not list any dir's except . and ..)
  706.         cd /usr
  707.         command rm -rf usr      (delete the empty /usr/usr directory)
  708.  
  709. Now Linux should be correctly installed and ready to be configured to
  710. suit your network setup. Check out all the files in /etc and edit them
  711. to suit your network. The editor "vi" should now be available, if not
  712. try and logout and relogin:
  713.  
  714.         exit
  715.  
  716. Now relogin using the login root and no password.
  717.  
  718.  
  719. System overview
  720. ---------------
  721.  
  722. Overview of directories:
  723.  
  724.         /                       root directory
  725.         /bin                    binaries
  726.         /dev                    devices such as console, harddrives etc.
  727.         /etc                    setup files
  728.         /home                   directory for login users or link to it
  729.         /lib                    libraries for compiling and more
  730.         /mnt                    empty directory. can be deleted
  731.         /mnt2                   empty directory. can be deleted
  732.         /root                   login directory for root user
  733.         /sbin                   system binaries (only for root)
  734.         /usr                    harddrive partition 2 (userfiles)
  735.         /usr/bin                additional binaries
  736.         /usr/etc                additional setup (users/applications etc)
  737.         /usr/lib                additional libraries
  738.         /var                    various files (logs etc)
  739.  
  740. Example of Bourne Again Shell (bash) configuration files
  741. --------------------------------------------------------
  742.  
  743. Each user has it's own "home" directory. These are usually located in
  744. /home/loginname/. There are no rule for where you want the users home-
  745. directories but it's wise to collect them in one common place. I made
  746. a symbolic link called /home which points to /users. Here I make
  747. directories for each user of my system and edit the /etc/passwd file
  748. to suit this setup.
  749.  
  750. By default Linux comes with bash. However you can compile csh, tcsh or
  751. any other shell as you like. I will here just describe some VERY basic
  752. functions of the bash configuration files.
  753.  
  754. Files in users home-dir and /root:
  755.  
  756.         .profile                executed first at login
  757.         .bashrc                 user-configurable bash sourcefile
  758.         .bash_history           log of last actions in bash
  759.         .bash_profile           executed first when bash is started
  760.  
  761. Example .bashrc file:
  762.  
  763.         #
  764.         # Userdefined aliases
  765.         #
  766.         # Run after .profile
  767.         #
  768.  
  769.         alias dir='ls -la'
  770.         alias ren='mv'
  771.         alias rd='rm -rf'
  772.         alias del='rm'
  773.         alias ll='ls -l'
  774.         alias move='mv'
  775.         alias copy='cp'
  776.         alias md='mkdir'
  777.  
  778. Bash commands:
  779.  
  780.         EDITOR=editor           Set default editor (ie. vi)
  781.         TERM=termtype           Set default terminaltype (ie. vt100)
  782.         PATH=paths              Set default searchpath (ie. /bin:/sbin)
  783.         export VARIABLE         Let system know of change (ie. export TERM)
  784.         alias this='do that'    Make alias for "do that" (ie. dir='ls -la')
  785.  
  786. It's recommended that you do further research on how to use the different
  787. shells that are available.
  788.  
  789.  
  790. The editor "vi"
  791. ---------------
  792.  
  793. vi is widely used in the UN*X communitity as it's available to most
  794. systems there is. Here is a quick breif userguide to vi. To find out
  795. more use "man vi".
  796.  
  797.         Syntax:         vi filename
  798.  
  799.         Commands:       :d      delete line
  800.  
  801.                         :x      save and exit
  802.  
  803.                         :quit!  abort edit and exit
  804.  
  805.                         a       append mode, starting after current charcter
  806.  
  807.                         i       enter insert mode, starting before current
  808.                                 character on line.
  809.  
  810.                         esc     enter command mode (to use :d etc)
  811.  
  812.  
  813. The password file
  814. -----------------
  815.  
  816. Users passwords and an overview of the login accounts on the system are
  817. found in /etc/passwd. This file has the following syntax:
  818.  
  819.         loginname:password:groupid:userid:Users Name:homedir:startup-shell
  820.  
  821. Example:
  822.  
  823.         root::0:0:System Maintainer:/root:/bin/bash
  824.  
  825. When no password is specified there is no need to enter a password at login.
  826. You can use the command "passwd" in UN*X to change your current password.
  827. This password will of course be encrypted so no other users can view
  828. /etc/passwd and find out your login password.
  829.  
  830. To add new users simply edit /etc/passwd and add a new line with the
  831. user information. DON'T FORGET to make a home-directory for this user !
  832.  
  833.  
  834. Other files in /etc
  835. -------------------
  836.  
  837. This directory contains all the system configurations and all files should
  838. be made only writable by the root-user. Here's a quick overview of the
  839. files that can be found here:
  840.  
  841.         bootptab        Information on how to start up remote machines
  842.         exports         Tells what NFS filesystems are available to others
  843.         fstab           File System Table (list of automounting drives)
  844.         gateways        List of available network gateways
  845.         group           List of available usergroups
  846.         host.conf
  847.         hosts           List of IP-to-address lookups
  848.         hosts.allow     Which hosts are allowed to login
  849.         hosts.deny      Which hosts are denied to login
  850.         hosts.equiv     Hosts trusted to do rsh logins
  851.         hosts.lpd       Hosts trusted to use local printer services
  852.         inet.conf       Services available from this server
  853.         inittab         Initiziation table for devices
  854.         issue           Login message (server information - see rc.local)
  855.         magic           Table of magicnumbers (filetypes)
  856.         NETCONF         System network configuration file
  857.         networks        List of address-to-IP lookups (if no nameserver)
  858.         profile         Global profile for login
  859.         protocols       List of protocols and functions
  860.         rc              Boot script, executes rc.local
  861.         rc.local        User-defined boot-script
  862.         rc.net          Network bootscript
  863.         resolv.conf     address-to-IP for gateway?
  864.         securetty       Which terminals are allowed root login??
  865.         services        Network services available
  866.         shells          List of shells and their binary-directories
  867.         syslog.conf     
  868.         termcap         List of how to handle different terminallogins
  869.  
  870.  
  871. Sources
  872. -------
  873.  
  874. This document was made based on the following sources:
  875.  
  876.         Linux PC documentation          tsx-11.mit.edu:/pub/linux
  877.         Amiga HowTo install textfile    tsx-11.mit.edu:/pub/linux/amiga
  878.         NetBSD beta installation        sun-lamp.cs.berkeley.edu
  879.         Linux diskimage file descriptions
  880.  
  881.  
  882. Credits
  883. -------
  884.  
  885.         The people on the channel #Amiga on IRC (Internet Relay Chat)
  886.         The Commodore Amiga team for making the Amiga
  887.         The authors of Linux for the Amiga
  888.  
  889.  
  890. Special thanks to
  891. -----------------
  892.  
  893.  
  894. The Author
  895. ----------
  896.  
  897. The author will not take any responsibility for errors or fault in this
  898. documentation, or faults to your system(s) for using this information.
  899. However the author has done his best to ensure the correctness of the
  900. included information.
  901.  
  902. Contributions to this documentation can be sent the author at the
  903. following addresses:
  904.  
  905.         Email:          oddjk@samson.ingok.hitos.no
  906.  
  907.         WWW/URL:        http://linux.ingok.hitos.no/~oddjk
  908.  
  909.         Snail mail:     Odd-Jarle Kristoffersen
  910.                         Gammelgaardvegen 42
  911.                         N-9020 Tromsdalen
  912.                         Norway
  913.  
  914. Please don't request any help from either addresses as I will not have
  915. time to follow up that. But you are free to report problems, updates or
  916. any other contribution. These will be used to make a FAQ helpguide.
  917.  
  918. Feel free to report any distribution sites for Amiga Linux.
  919.  
  920.  
  921. Future plans
  922. ------------
  923.  
  924.         - How to get X11 windows to run on your Linux setup
  925.         - Supported hardware overview
  926.         - Complete FTP site list of Amiga Linux distributors
  927.         - Internet Online help for Linux
  928.